package com.atguigui.leetcode;

import java.util.Arrays;

/**
 * 1662.检查两个字符串数组是否相等
 * Project: leetcode
 * Package: com.atguigui.leetcode
 * Version: 1.0
 * <p>
 * Created by WJX on 2022/11/1 8:46
 */
public class P1662CheckIfTwoStringArraysAreEquivalent {
    public static void main(String[] args) {
        Solution solution = new P1662CheckIfTwoStringArraysAreEquivalent().new Solution();
        String[] word1 = {"ab", "c"};
        String[] word2 = {"a", "bc"};
        System.out.println(solution.arrayStringsAreEqual(word1, word2));
        // TO TEST
    }

    class Solution {
        public boolean arrayStringsAreEqual(String[] word1, String[] word2) {
            String wordA = Arrays.toString(word1).replace(", ", "");
            String wordB = Arrays.toString(word2).replace(", ", "");
            return wordA.equals(wordB);
        }
    }
}
